FROM python:3.7-alpine
LABEL maintainer="l1xnan@qq.com"

ARG INDEX_URL="https://pypi.douban.com/simple"

RUN pip config set global.index-url ${INDEX_URL}

WORKDIR /project
COPY requirements.txt .
RUN pip install --no-cache-dir gunicorn
RUN pip install --no-cache-dir -r requirements.txt

COPY . /project

# ENV PORT 8000
EXPOSE 8000 5000
CMD ["gunicorn", "-w", "2", "-b", ":8000", "wsgi:app"]
# CMD ["gunicorn", "-c", "gunicorn_config.py", "wsgi:app"]
